home *** CD-ROM | disk | FTP | other *** search
/ Champak 120 / Vol 120.iso / games / titans / beastboy.swf / scripts / DefineSprite_6_sbul2 / frame_1 / DoAction.as
Text File  |  2010-11-09  |  500b  |  41 lines

  1. xs = -8;
  2. if(_xscale < 0)
  3. {
  4.    xs = - xs;
  5. }
  6. if(!delay)
  7. {
  8.    d = 5;
  9. }
  10. else
  11. {
  12.    d = delay;
  13. }
  14. onenterframe = function()
  15. {
  16.    _X = _X + xs;
  17.    if(_alpha > 50)
  18.    {
  19.       if(cekhitp(this))
  20.       {
  21.          if(xs > 0)
  22.          {
  23.             r.hd = 2;
  24.          }
  25.          else
  26.          {
  27.             r.hd = 1;
  28.          }
  29.       }
  30.    }
  31.    d--;
  32.    if(d < 0)
  33.    {
  34.       _alpha = _alpha - 30;
  35.       if(_alpha <= 0)
  36.       {
  37.          this.removeMovieClip();
  38.       }
  39.    }
  40. };
  41.